package com.avecsys.quotemanager.exception;

/**
 * @author Sam Sundar K
 * 
 */
public class BaseException extends Exception {

	public final static int SEVERITY_ERROR = 1;

	public final static int SEVERITY_WARN = 2;

	public final static int SEVERITY_INFO = 3;

	private String errorCode;

	private Object[] errorCodeArgs;

	private int severity;

	public BaseException() {
		super();
	}

	public BaseException(Exception e) {
		super(e);
	}

	public BaseException(String errorCode, Exception e) {
		super(e);
		this.errorCode = errorCode;
	}

	public BaseException(String errorCode, Exception e, int severity) {
		super(e);
		this.errorCode = errorCode;
		this.severity = severity;
	}

	public BaseException(String errorCode, Exception e, int severity,
			Object[] objects) {
		super(e);
		this.errorCode = errorCode;
		this.severity = severity;
		this.errorCodeArgs = objects;
	}

	public String getErrorCode() {
		return errorCode;
	}

	public Object[] getErrorCodeArgs() {
		return errorCodeArgs;
	}

	public int getSeverity() {
		return severity;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}

	public void setErrorCodeArgs(Object[] errorCodeArgs) {
		this.errorCodeArgs = errorCodeArgs;
	}

	public void setSeverity(int severity) {
		this.severity = severity;
	}

}
